<?php
namespace app\index\validate;
use think\Validate;
class Score extends Validate
{

    protected $rule=[
        'sname'=>'unique:students|require|max:25',
        'xuehao'=>'require|max:8',
    ];


    protected $message=[
        'sname.require'=>'姓名不得为空！',
        'sname.unique'=>'姓名不得重复！',
        'xuehao.require'=>'学号不得为空！',
        'xuehao.max'=>'学号不得大于8位',
    ];

    protected $scene=[
        'add'=>['sname','xuehao'],
        'edit'=>['sname','xuehao'=>'max:8'],
    ];





    

    




   

	












}
